<!DOCTYPE html>
<html lang="en" dir="ltr">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
    <meta name="referrer" content="never">
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <title>welcome</title>

    <style type="text/css">
        body,
        .container {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;
            /* background-color: #EF0101;
            background: linear-gradient(to bottom right, #403B4A, #E7E9BB); */
            width: 100%;
            height: 100vh;
            box-sizing: border-box;
        }

        .zan {
            width: 80px;
            height: 80px;
            position: relative;
            z-index: 999;
            background-image: url();
            background-size: cover;
        }

        .animation {
            -webkit-animation: rotate 2s linear;
            animation: rotate 2s linear;
        }

        .biubiu {
            -webkit-transform: rotate(720deg) scale(2, 2);
            transform: rotate(720deg) scale(0, 0);
            -webkit-transition: all 2s ease-in-out;
            transition: all 2s ease-in-out;
        }

        .bg-bubbles {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
        }

        .bg-bubbles li {
            position: absolute;
            bottom: -80px;
            width: 20px;
            height: 20px;
            background-color: rgba(255,255,255,0.15);
            list-style: none;
            animation: square 15s infinite;
            transition-timing-function: linear;
            overflow: hidden;
        }

        li image {
            width: 100%;
            height: 100%;
        }

        .bg-bubbles li:nth-child(1) {
            left: 10%;
            width: 54px;
            height: 54px;
            background-image: url();
            background-size: cover;
            /* background-color: rgb(228, 17, 17); */
        }

        .bg-bubbles li:nth-child(2) {
            left: 20%;
            width: 75px;
            height: 75px;
            animation-delay: 2s;
            animation-duration: 7s;
            background-image: url();
            background-size: cover;
        }

        .bg-bubbles li:nth-child(3) {
            left: 25%;
            animation-delay: 4s;
        }

        .bg-bubbles li:nth-child(4) {
            left: 40%;
            width: 60px;
            height: 60px;
            animation-duration: 8s;
            /* background-color: rgba(255,255,255,0.3); */
            background-image: url();
            background-size: cover;
        }

        .bg-bubbles li:nth-child(5) {
            left: 70%;
            background-image: url();
            background-size: cover;
        }

        .bg-bubbles li:nth-child(6) {
            left: 65%;
            width: 60px;
            height: 60px;
            animation-delay: 3s;
            /* background-color: rgba(255,255,255,0.2); */
            background-image: url();
            background-size: contain;
        }

        .bg-bubbles li:nth-child(7) {
            left: 32%;
            width: 80px;
            height: 80px;
            animation-delay: 2s;
            background-image: url();
            background-size: cover;
        }

        .bg-bubbles li:nth-child(8) {
            left: 78%;
            width: 80px;
            height: 80px;
            animation-delay: 5s;
            background-image: url();
            background-size: cover;
        }

        @keyframes square {
            0% {
                opacity: 0.5;
                transform: translateY(0) rotate(45deg);
            }

            25% {
                opacity: 0.75;
                transform: translateY(-400px) rotate(90deg);
            }

            50% {
                opacity: 1;
                transform: translateY(-600px) rotate(135deg);
            }

            100% {
                opacity: 0;
                transform: translateY(-500px) rotate(180deg);
            }
        }

        @keyframes rotate {
            0% {
                -webkit-transform: rotate(0);
                transform: rotate(0);
            }

            50% {
                -webkit-transform: rotate(-180deg);
                transform: rotate(-180deg);
            }

            100% {
                -webkit-transform: rotate(-360deg);
                transform: rotate(-360deg);
            }
        }
    </style>

</head>

<body>
    <div class="container">
        <div id="zanId" class="zan animation" onclick="onTap()"></div>
        <ul id="zanId-ul" class="bg-bubbles">
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
        </ul>
    </div>

    <script>
        var timer = null;
        var rotate = false
        !(function () {
            timer = setTimeout(() => {
                rotate = true;
                $("#zanId").addClass("biubiu")
                $("#zanId-ul").addClass("biubiu")
                setTimeout(() => {
                    console.log('233')
                }, 2000);
            }, 4000);
        })
        function onTap() {
            clearTimeout(timer);
            rotate = true;
            $("#zanId").addClass("biubiu")
            $("#zanId-ul").addClass("biubiu")
            setTimeout(() => {
                console.log('322')
            }, 2000)
        }
    </script>
</body>

</html>